import axios from 'axios'

export const findInStockList = (current, size, inStockVo) => {
  return axios({
    url: '/api/inStock/findInStockList',
    method: 'post',
    /*localhost:8080/user?id=  方式传值*/
    params: {
      current,
      size
    },
    /*json数据传值*/
    data: inStockVo
  })
}

/*删除入库清单*/
export const del = (id,inNum) => {
  return axios({
    url: '/api/inStock/delInStock',
    method: 'delete',
    params: {
      id,
      inNum
    }
  })
}

/*恢复入库清单*/
export const back = (id) => {
  return axios({
    url: '/api/inStock/backInStock',
    method: 'post',
    params: {
      id
    }
  })
}

/*移至回收站*/
export const remove = (id) => {
  return axios({
    url: '/api/inStock/removeInStock',
    method: 'post',
    params: {
      id
    }
  })
}

/*入库审核通过*/
export const publish = (id,inNum) => {
  return axios({
    url: '/api/inStock/publishInStock',
    method: 'post',
    params: {
      id,
      inNum
    }
  })
}

/*添加入库申请*/
export const addIntoStock = (intoStockVo) => {
  return axios({
    url: '/api/inStock/addIntoStock',
    method: 'post',
    data: intoStockVo
  })
}

/*入库详情*/
export const detail = (inNum,supplierId,current) => {
  return axios({
    url: '/api/inStock/detail',
    method: 'post',
    params: {
      inNum,
      supplierId,
      current,
    }
  })
}
